//业务加载
$(function(){
	//用户登录
	$('#playerloginBTN').bind('click',function(){
		$.ajax({
			type:"post",
			url: ajaxUrl + "/game/1.0/player/login.js",
			data:{
				token : window.localStorage.getItem('token'),
				jobId : getTimeMs(),
				sid: currentSID,
				//token : window.localStorage.getItem('token'),
				securityCode : $('#securityCode').val(),
				account : $('#account').val(),
				//需要加密处理
				passWord : $('#passWord').val()
			},
			dataType:"json",
			success:function(request){
				console.log(request);
				if(request.code=="0"){
					window.localStorage.setItem('token', request.token);
					top.location.href="home.html";
				}else{
					securityCodeImgReLoad();
					$('#msg').text(request.msg)
				}				
			},
			error:function(error){
				console.log(error);	
			}
		});
	});	

});
